<h1>
  <%= @post.title %>
</h1>
<i>Published <%= @post.published_at.strftime('%d %B %Y') %></i>
<p>
  <%= simple_format(@post.content) %>
</p>


<% if session[:admin] %>
  <%= ajax_link_to 'Edit', edit_post_path(@post) %> |
  <%= ajax_link_to 'Destroy', @post, :confirm => 'Are you sure?', :method => :delete %> |
<% end %>
<%= ajax_link_to 'Back', posts_path %>
